<!DOCTYPE HTML>
<html>
<head>
	<title>Welcome!</title>
</head>
<body>
<center>
<h2>Web Socket test page</h2>

<script>
var wsobj = window.WebSocket;		/* W3C */
if (wsobj === undefined) {
	wsobj = window.MozWebSocket;	/* Firefox */
	if (wsobj === undefined)
		alert("Your browser doesn't support Web Sockets!");
}

var conn = new wsobj('ws://localhost/ws.rsp');

conn.onopen    = function(evt) { alert('Connection opened');}
conn.onmessage = function(evt) { alert('Read: ' + evt.data); }
conn.onclose   = function(evt) { alert('Connection closed'); }


</script>
<button onClick="conn.send('Hello World');"> Send Message </button>
<button onClick="conn.close(1000);"> Disconnect </button>
</center>
</body>
</html>